package com.zhigh.test.testuinit.sty.pojo;

import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty;
import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public abstract class ESBData {

    @JacksonXmlProperty(isAttribute = true)
    protected String name;

    public ESBData(String name) {
        this.name = name;
    }

    public ESBData() {
    }

    public ESBData addObject(ESBObjectData objectData) {
        throw new UnsupportedOperationException(String.format("%s Not support ..#addObject(String, ESBObjectData)", this.getClass().getSimpleName()));
    }

    public ESBData addField(ESBField field) {
        throw new UnsupportedOperationException(String.format("%s Not support ..#addField(String, ESBField)", this.getClass().getSimpleName()));
    }

    public ESBData addArray(ESBArrayData<?> esbArrayData) {
        throw new UnsupportedOperationException(String.format("%s Not support ..#addArray(String, ESBArrayData<?>)", this.getClass().getSimpleName()));
    }

}
